#identify jpgsize is 320x or 640x480,if xsize>480,mv to $2(hori/),else $3(vert/)
#identify -ping $1 | sed -e "s/.*JPEG //g" | sed -e "s/x.*//g"

xsize=`identify -ping $1 | sed -e "s/.*JPEG //g" | sed -e "s/x.*//g"`
if [ $xsize -ge 480 ] ; then
mv $1 $2
else
mv $1 $3
fi

